package com.common.response;

/**
 * @program: my-springboot
 * @description: 响应码
 * @author: zyj
 * @create: 2019-12-05 11:36
 **/
public enum ResponseCode {

    GET_ERROR("001", "获取失败"),
    SAVE_ERROR("100", "保存失败"),
    UPDATE_ERROR("200", "修改失败"),
    DELETE_ERROR("300", "删除失败"),
    UNAUTHORIZED("401", "认证失败"),
    LOGIN_ERROR("402", "登陆失败，用户名或密码无效"),
    FORBIDDEN("403", "禁止访问"),
    NOT_FOUND("405", "请求的资源不存在"),
    OPERATE_ERROR("406", "操作失败，请求操作的资源不存在"),
    TIME_OUT("408", "请求超时"),
    REQUEST_ERROR("500", "请求失败"),
    IMAGE_CODE_ERROR("501", "验证码错误"),
    IMAGE_CODE_TIMEOUT("502", "验证码超时"),
    REQUEST_SUCCESS("200", "请求成功");


    private String value;
    private String descripe;

    ResponseCode(String value, String descripe){
        this.value = value;
        this.descripe = descripe;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getDescripe() {
        return descripe;
    }

    public void setDescripe(String descripe) {
        this.descripe = descripe;
    }
}
